//
// Created by Gorun on 2022/5/3.
//

#ifndef LOXPP_RUNTIMEERROR_H
#define LOXPP_RUNTIMEERROR_H

#include <stdexcept>
#include <string>
#include <string_view>

#include "Token.h"

using namespace std;

class RuntimeError: public runtime_error {
public:
    const Token& token;

    RuntimeError(const Token& token, string_view message)
    : runtime_error{message.data()}, token(token)
    {}
};

#endif //LOXPP_RUNTIMEERROR_H
